import * as types from "../types/product"

export const creactAction = (type) => (payload = {}) => ({ type, payload })
//关于product的actions

//发起请求
export const getProduct = creactAction(types.FETCH_PRODUCT)
//正在获取购物车商品
export const getProductReq =  creactAction(types.FETCH_PRODUCT_REQ)
// 获取购物车商品成功
export const getProductSuccess = creactAction(types.FETCH_PRODUCT_SUCCESS)
// 获取购物车商品失败export 
export const getProductFail = creactAction(types.FETCH_PRODUCT_FAIL)
// 添加到购物车
export const addToCart = creactAction(types.ADD_TO_CART)